package top.i89ck.modules.admin;

import com.jfinal.core.Controller;
import com.jfinal.core.Path;
import top.i89ck.modules.model.Option;
import top.i89ck.modules.utils.Const;

/**
 * 路由跳转控制器
 *
 * @author Seiya
 */
@Path(value = "admin/route")
public class RouteController extends Controller {

    public void index() {
        Integer optionId = getParaToInt(0);
        Option option = Option.dao.findById(optionId);
        set(Const.CFG_OPTION, option);
        forwardAction("/" + option.getUrl());
    }

}
